package edu.terapia.model;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the identity_permission database table.
 * 
 */
@Entity
@Table(name="identity_permission")
public class IdentityPermission implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int id;

	private String permission;

	@Column(name="RELATIONSHIP_NAME")
	private String relationshipName;

	private String resource;

	//bi-directional many-to-one association to IdentityObject
	@ManyToOne
	@JoinColumn(name="IDENTITY_OBJECT_ID")
	private IdentityObject identityObject;

	//bi-directional many-to-one association to IdentityObjectRelationshipType
	@ManyToOne
	@JoinColumn(name="IDENTITY_OBJECT_RELATIONSHIP_TYPE_ID")
	private IdentityObjectRelationshipType identityObjectRelationshipType;

	public IdentityPermission() {
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getPermission() {
		return this.permission;
	}

	public void setPermission(String permission) {
		this.permission = permission;
	}

	public String getRelationshipName() {
		return this.relationshipName;
	}

	public void setRelationshipName(String relationshipName) {
		this.relationshipName = relationshipName;
	}

	public String getResource() {
		return this.resource;
	}

	public void setResource(String resource) {
		this.resource = resource;
	}

	public IdentityObject getIdentityObject() {
		return this.identityObject;
	}

	public void setIdentityObject(IdentityObject identityObject) {
		this.identityObject = identityObject;
	}

	public IdentityObjectRelationshipType getIdentityObjectRelationshipType() {
		return this.identityObjectRelationshipType;
	}

	public void setIdentityObjectRelationshipType(IdentityObjectRelationshipType identityObjectRelationshipType) {
		this.identityObjectRelationshipType = identityObjectRelationshipType;
	}

}